<!DOCTYPE html>
<html lang="en">
<head>
    {% load staticfiles %}
    <meta charset="UTF-8">
    <title>青岛大学 每日疫情上报</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css"
          integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.slim.min.js"
            integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
            integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
            crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"
            integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
            crossorigin="anonymous"></script>
    <style>
        .im-tainer{
            margin-top: 25px;
            display: flex;
            flex-direction: column;
            width: 100%;
            justify-items: center;
            align-items: center;
            text-align: center;
            min-height: 52vh;
        }
        body {
            background-color: #f7f7f7;
        }

        .footer {
        {#position: fixed;#} bottom: 0;
            display: flex;
            flex-direction: column;
            width: 100%;
        {#vertical-align: center;#}

        }

        .footer-p {
            display: flex;
            flex-direction: column;
            font-size: 12px;
            color: #5a6268;
            justify-items: center;
            align-items: center;
        }
        .jumbotron{

        }
        .lead{
            font-weight: bold;
        }
    </style>
</head>
{#<body onload="fabide()">#}
<body>
<div class="container" id="normal">
    {#导航栏#}
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <a class="navbar-brand" href="#">青岛大学 每日疫情上报</a>
    </nav>
    {#巨幕#}
    {% if moto.isshow %}
    <div class="jumbotron ">
        <h1 class="display-4">公告<span class="badge badge-secondary bg-danger text-white">重要</span></h1>
        <p class="lead">{{ moto.moto }}</p>
        <a class="btn btn-primary btn-lg" href="{{ moto.moto_url }}" role="button">Learn more</a>
    </div>
        {% else %}
        <img src="https://www.qdu.edu.cn/images/20200128182050.gif" style="width: 100%;margin-bottom: 12px;margin-top: 6px">
    {% endif %}
    {% if notValid %}
        <div class="alert alert-warning alert-dismissible fade show" role="alert">
            请检查您的学工号、类别、身份证号是否匹配
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                <span aria-hidden="true">&times;</span>
            </button>
        </div>
    {% endif %}

    {#登录表单#}
    <form method="post" action="#">
        {% csrf_token %}
        <div class="form-group">
            <label for="exampleInputPassword1">类别：</label>
            <select class="custom-select" name="type">
                <option value="0">本科生</option>
                <option value="1">研究生</option>
                <option value="2">教职工</option>
            </select>
        </div>
        <div class="form-group">
            <label for="exampleInputEmail1">学（工）号</label>
            <input type="text" class="form-control" name="username" required>
            <small id="emailHelp" class="form-text text-muted">请输入您校园一卡通上的学（工）号</small>
        </div>
        <div class="form-group">
            <label for="exampleInputPassword1">身份证号码后6位</label>
            <input type="password" class="form-control" name="passwd" required maxlength="6">
        </div>
        <button type="submit" class="btn btn-primary">登录</button>
    </form>
</div>
<div class="container" id="tobroswer" hidden>
    <div class="im-tainer">
        <img src="{% static 'css/important.svg' %}">
        <h2 style="margin-top: 2vh">点击右上角“···”选择“在浏览器打开”继续访问</h2>
    </div>
</div>

<footer class="footer">
        <div class="footer-p">
            <p>青岛大学 版权所有 ©2020</p>
            <p>电子邮件：<a href="mailto:ecampus@qdu.edu.cn">ecampus@qdu.edu.cn</a></p>
            <p>青岛大学 智慧校园服务创新协会 提供技术支持</p>

        </div>
    </footer>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>
<script>
    function fabide() {
        let ua = navigator.userAgent.toLowerCase();
        let isWeixin = ua.indexOf('micromessenger') != -1;
        $("#tobroswer").hide();
        if (isWeixin) {
            $("#tobroswer").show();
            $("#normal").hide();
        } else {
            $("#normal").show();
        }
    }
</script>

</body>
</html>